<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title> Insha - Css3 Responsive Sidebar Menu</title>

    <link href="static/css/css2.css" rel="stylesheet">
    <link href='static/css/boxicons.min.css' rel='stylesheet'>
    <link rel="stylesheet" href="static/css/insha-style.css">

</head>

<body>

<div class="main" id="app">
    <div class="sidebar">
        <div class="logo_content">
            <div class="logo">
                <div class="logo_name">
                    <a href="#">
                        <i class='bx bxs-bank'></i>
                        银行业务管理系统
                    </a>
                </div>
            </div>
            <i class='bx bx-menu' id="toggle-menu-btn"></i>
        </div>
        <ul class="nav_list">

            <li>
                <a href="online.html">
                    <i class='bx bx-yen'></i>
                    <span class="links_name">网上银行</span>
                </a>
                <span class="tooltip">网上银行</span>
            </li>
            <li>
                <a href="counter.html">
                    <i class='bx bxs-user-account'></i>
                    <span class="links_name">银行柜面</span>
                </a>
                <span class="tooltip">银行柜面</span>
            </li>

        </ul>

    </div>
    <div class="home_content">
        <div class="text">银行柜面</div>
        <div class="rg_layout1">
            <div class="rg_left">
                <p>结息</p>

            </div>
            <div class="rg_center">
                <div class="rg_form">
                    <!--定义表单 form-->
                    <form action="#" method="">
                        <table id="tbe">
                            <tr>
                                <td class="td_left"><label for="idCard">银行卡号</label></td>
                                <td class="td_right"><input type="text" name="idCard" id="idCard"
                                                            placeholder="请输入银行卡号" v-model="idCard">
                                </td>
                            </tr>


                            <tr>
                                <td colspan="2" align="center"><input type="button" id="btn_sub" value="结息"
                                                                      @click="cm()"></td>
                            </tr>
                        </table>

                    </form>


                </div>

            </div>

            <button id="bn1" @click="back1()">返回</button>
        </div>
    </div>

</div>


<script src="static/js/scripts.js"></script>
<script src="static/js/vue.js"></script>
<script src="static/js/axios.min.js"></script>
<script>
    const app = new Vue({
        el: "#app",
        data: {
            idCard: "",

        },
        methods: {
            back1() {
                location.href = "counter.html"
            },
            cm() {
                //存息请求
                axios.get("http://localhost:8080/interestSettlementController/countInterestSettlement?data=1&bankNo=" + this.idCard).then(res => {
                    if (res.data.code == 200) {
                        //存款请求
                        alert("恭喜你，结息成功！");
                        window.location.reload();
                    } else {
                        alert("系统故障，结息失败");
                    }
                })

            },

        }
    })
</script>

</body>

</html>
